package ebj.common.java8.collection;

import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


public class CollectionsSort {
	public static void main(String[] args) {
		
		
		List<String> names = Arrays.asList("peter", "anna", "mike", "xenia");
		
		Collections.sort(names, new Comparator<String>() {
			@Override
			public int compare(String arg0, String arg1) {
				return arg0.compareTo(arg1);
			}
		});
		Collections.sort(names, (String name1, String name2) -> {
			return name1.compareTo(name2);
		});
		
		for (String string : names) {
			System.out.println(string);
		}
		
		Map<String, Object> map = new HashMap<String, Object>();
		map.entrySet().stream();
	}
}
